
open Parseutils
;;

open Errors
;;

let run tool name = 
  try
    tool name
  with
    | Bad_ident -> bad_ident_msg (line ())
    | Wrong_eof -> wrong_eof_msg ()
    | Parsing.Parse_error -> syntax_error_msg (line ())
    | Name_clash1 -> name_clash1_msg ()
    | Name_clash2 -> name_clash2_msg ()
    | Name_clash3 fname -> name_clash3_msg fname
    | Unknown_ident id -> unknown_ident_msg id (line ())
    | Unknown_member name -> unknown_member_msg name (line ())
    | UnknownType_error -> unknowntype_error_msg (line ())
    | EType_error -> etype_error_msg (line ())
    | SType_error -> stype_error_msg (line ())
    | Sort_error fname -> sort_error_msg fname
    | Void_declared_error var -> void_declared_msg var (line ())
;;

